package demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:编译时异常
 * User: LianBao
 * Date: 2024-03-16
 * Time: 16:29
 */


class A implements Cloneable {
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}

public class Test3 {
    public static void main(String[] args) throws CloneNotSupportedException {
        try {
            A a = new A();
            A ret = (A) (a.clone());
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

    }
}
